$(document).ready(function() {

	/* attach a submit handler to the form */
	$("#sendTaskForm").submit(function(event) {

		/* stop form from submitting normally */
		event.preventDefault();
		var url = "tasks/send";

		/*get task to server*/
		$.getJSON(url, {task: $('#task').val()}, function(task) {
			       alert(task);
			});

				
		/* clear task box */
		$("#task").val('');
	});

});
